<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="jt.classic.system.workflow.WObject"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="java.util.Calendar"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.util.Map"%>
<%@ page import="java.util.List"%>

<%@ page import="jt.classic.system.object.IObject"%>
<%@ page import="org.limp.basework.Table"%>
<%
	String context = jt.classic.system.ISystem.getContextPath();
	IUser user = jt.classic.system.ISystem.getSessionUser(request);
	IObject obj = (IObject) request.getAttribute("object");
	WObject wobject = (WObject) request.getAttribute("wobject");
	String id = StringTool.checkString(request.getParameter("id"));
	String querykey = StringTool.checkString(request
			.getParameter("querykey"));
	String type = StringTool.checkString(request.getParameter("type"));
	Table table = wobject.itable("APP_LFDTL");
	List list = (List) obj.icontent(table);
	
	Calendar cal = Calendar.getInstance();
	java.util.Date date = cal.getTime();
	SimpleDateFormat sdFormat = new SimpleDateFormat("yyyyMMddhhmmssSSS");
	String LAH = "L"+sdFormat.format(date);  
	
	String lfsjs = "sjs"+sdFormat.format(date);
    String label = "(街乡)";
	
	if(type.equals("1")){
		label = "(区)";
	}
	
	String root = "00000010";
	
	if(type.equals("1")){
		root = "00000001";
	}
	
	Date currentTime = new Date();
	SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
	//后延60天为办结期限
	long myTime = (currentTime.getTime() / 1000) + 60 * 24 * 60 * 60;
	currentTime.setTime(myTime * 1000);
	String mdate = formatter.format(currentTime);


%>
<%@page import="java.util.Date;"%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>来访登记</TITLE>
<script type="text/javascript">
</script>
<jsp:include page="../../system/object/initial4neu.jsp"></jsp:include>

<link rel="stylesheet" type="text/css"
	href="<%=context%>/app/lf/css/xfstyle.css" />
<script src="<%=context %>/app/lf/js/xfinit.js"></script>

<script>
<%
         if(type.equals("1")){
     %>
     var url = context + '/system/objquery/commonlist.jsp?queryKey=qulfdjlist';
     <%
         }else{
     %>
     var url = context + '/system/objquery/commonlist.jsp?queryKey=jxlfdjlist';
     <%
         }
     %>
     
     var levelTwoNames=""  ;
     
     function handleSave(){
         if(initCountItem()){
         	kcz();
            handleSubmit(function(){window.location.href = url;});
            
         }
     }

     function init(){
         if(id==''){
	         initLfdjStyle();
	         initPageForm();
	     }else{
	     	initLfdjStyle();
         	editObject_neu();
	     }
     }
     
     function kcz(){
     	var objForm = document.forms[0];
		var objLen = objForm.length;
        for ( var iCount = 0; iCount < objLen; iCount++) {
        	objForm.elements[iCount].readOnly = false;
        	objForm.elements[iCount].disabled = false;
        }
     }
</script>
</HEAD>
<BODY style="background-color:#fff;" onload="javascript:init();">
<form id="form1" name="form1" method="post"
	enctype="multipart/form-data" action=""><input type="hidden"
	name="lfid" value=""> <input type="hidden" name="DJRID"
	value="<%=user.id() %>"> <input type="hidden" name="LFTYPE"
	value="<%=type %>">  <input type="hidden" name="LFSTATUS"
	value="0"><input type="hidden" name="BLSTATUS"
	value="2"> <input type="hidden" name="FCSTATUS" value="-1">
<input type="hidden" name="FHSTATUS" value="-1">
<%if(!"".equals(id)){ %>
	<input type="hidden" name="LF_SJS"  value="">
	<input type="hidden" name="LFBS"  value="">
	<input type="hidden" name="TS_LFID"  value="<%=id%>">
<%}else{%>
	<input type="hidden" name="LF_SJS"  value="<%=lfsjs%>" />
	<input type="hidden" name="LFBS"  value="0">
<%} %>
<div>&nbsp;</div>
<table width="800" class="tab4edit" border="1" cellspacing="0"
	cellpadding="0" align="center">

	<tr>
		<td colspan="4" class="tdtlt">
		<div align="center"><!-- <%=label %> -->来访案件登记</div>
		</td>
	</tr>
	<tr align="left" bgcolor="#FFFF99">
		<td colspan="4" valign="middle"><font color=red>带</font><font
			color="#003399">“</font><font color=red>*</font><font color="#003399">”</font><font
			color=red>的项目为必填项</font></td>
	</tr>
	<tr id="district1" >
		<td align="right" valign="middle" class="td0">编号类型 <FONT
			COLOR="#FF3366">*</FONT></td>
		<td align="left"><input type="hidden" name="BHLXID" id="BHLXID" value=""
			special="wordbook" wbtype="xf_bhlx" wbname="BHLXNAME" colneed="1"
			label="编号类型"> <input type="hidden" name="BHLXNAME" value=""></td>
		<td align="right" class="td0">编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</td>
		<td align="left"><input type="text" name="LFCODE" maxlength="32"
			value="" onkeyup="value=value.replace(/[^\d]/g,'')" />&nbsp;&nbsp;<FONT
			SIZE="" COLOR="#FF0000"> </FONT></td>
	</tr>
	<!--  
	<tr >
		<TD vAlign=center align=right class="td0">国家内容分类 <font color=red>*</font></TD>
		<TD align=left><input type="text" name="GJNRNAME" id="GJNRNAME"
			value="" readonly="readonly"> <input type="hidden"
			name="GJNRID" id="GJNRID" value="" special="dataindex"
			wbtype="GJNRFL" wbname="GJNRNAME" colneed="1" label="国家内容分类">
		</TD>
		<td align="right" class="td0">性质分类 <FONT COLOR="#FF3366">*</FONT></td>
		<td align="left"><input type="text" name="XZNAME" id="XZNAME"
			value=""> <input type="hidden" name="XZID" id="XZID" value=""
			special="dataindex" wbtype="XZFL" wbname="XZNAME" colneed="1"
			label="性质分类"></td>
	</tr>
-->
	<TR bgColor=#ffffff>
		<td width="150" align="right" valign="middle" class="td0">内容分类<FONT
			COLOR="#FF3366">*</FONT></td>
		<td width="250" align="left"><input type="text" name="NRNAME" id="NRNAME"
			value=""> <input type="hidden" name="NRID" id="NRID" value=""
			special="dataindex" wbtype="NRFL" wbname="NRNAME" colneed="1"
			label="内容分类"></td>
		<td width="150" class="td0" align="right" valign="middle" >信息来源</td>
		<td width="250" align="left"><input type="hidden" name="XXLYID" value=""
			special="wordbook" wbtype="xf_xxly" wbname="XXLYNAME" > <input type="hidden" name="XXLYNAME" value="">
		</td>
	</TR>
<!--  
	<tr>
		<td align="right" valign="middle" class="td0">信访问题分类 <FONT
			COLOR="#FF3366">*</FONT></td>
		<td align="left"><input type="text" name="XFWTNAME" value="">
		<input type="hidden" name="XFWTID" value="" special="dataindex"
			wbtype="SBGJXFJTJ" wbname="XFWTNAME" colneed="1" label="信访问题分类">
		</td>
		<td align="right" class="td0">是否区立案</td>
		<td align="left"><input type="radio" name="LA" value="0"
			onclick="lianxinxiBlock()" /> 是 <input type="radio" name="LA"
			value="1" checked="checked" onclick="lianxinxiNone()" /> 否</td>
	</tr>-->
	<tr>
		<td align="right" class="td0">是否区立案</td>
		<td align="left"  ><input type="radio" name="LA" value="0"
			onclick="lianxinxiBlock()" /> 是 <input type="radio" name="LA"
			value="1" checked="checked" onclick="lianxinxiNone()" /> 否</td>
		<td align="right" class="td0">处理情况 </td>
		<td align="left" style="display:block " ><input type="hidden"
			name="CLQKID" value="" special="wordbook" wbtype="CLQK"
			wbname="CLQKNAME"> <input
			type="hidden" name="CLQKNAME" value=""></td>
	</tr>

	<tr id="lianxinxi">
		<td align="right" valign="middle" class="td0">立案来源</td>
		<td align="left"><input type="hidden" name="LALYID" value=""
			special="wordbook" wbtype="laly" wbname="LALYNAME" label="立案来源">
		<input type="hidden" name="LALYNAME" value=""></td>
		<td align="right" class="td0">立案编号</td>
		<td align="left"><input type="text" name="LAH" maxlength='30' value=<%=LAH %>
			readonly /></td>
	</tr>
	<!-- <tr>
		<td align="right" class="td0">窗口处理形式 <FONT COLOR="#FF3366">*</FONT></td>
		<td align="left" style="display:block "><input type="hidden"
			name="CKCLSHID" value="" special="wordbook" wbtype="CKCLSH"
			wbname="CKCLXSNAME" colneed="1" label="窗口处理形式"> <input
			type="hidden" name="CKCLXSNAME" value=""></td> 
		<td align="right" class="td0">处理情况 <FONT COLOR="#FF3366">*</FONT></td>
		<td align="left" style="display:block "  colspan="3"><input type="hidden"
			name="CLQKID" value="" special="wordbook" wbtype="CLQK"
			wbname="CLQKNAME" colneed="1" label="处理情况"> <input
			type="hidden" name="CLQKNAME" value=""></td>
	</tr>-->
	<tr align="right" valign="middle">

		<td align="right" class="td0">日常接待</td>
		<td align="left"><input type="radio" name="RCJD" value="0"
			checked="checked" onclick="richangjiedai(true)" /> 日常接待&nbsp; <input
			type="radio" name="RCJD" value="1" onclick="richangjiedai(false)" />
		领导接待日接待&nbsp;</td>

		<td class="td0">
		<div id="jdr1">接 待 人 <FONT COLOR="#FF3366">*</FONT></div>
		</td>
		<td align="left" style="display:block ">
		<div id="jdr2"><input type="text" name="JDR" maxlength="16"
			size="16" value="" colneed="1" label="接待人" /></div>
		</td>

	</tr>
	<tr align="right" valign="middle">

		<td class="td0">是否越级访问</td>
		<td align="left"  colspan="3"><input type="radio" name="SFYJFW" value="0"
			checked="checked" /> 否 <input type="radio" name="SFYJFW" value="1" />
		到市信访办上访 <input type="radio" name="SFYJFW" value="2" /> 到市其他部门上访
		 <input type="radio" name="SFYJFW" value="3" /> 到国家信访办上访
		  <input type="radio" name="SFYJFW" value="4" /> 到中央其他部门上访</td>
		
	</tr>
<tr align="right" valign="middle" bgcolor="#FFFFFF">
		<!-- <td width="150" align="right" class="td0">是否有效信</td>
		<td width="250" align="left"><input type="radio" name="VALID"
			value="1" checked="checked" /> 是 <input type="radio" name="VALID"
			value="0" /> 否</td> -->
		<td width="150" class="td0" align="right">督办类型</td>
		<td width="250" align="left"><input type="hidden" name="DBLXID" value=""
			special="wordbook" wbtype="xf_dblx" wbname="DBLXNAME"> <input
			type="hidden" name="DBLXNAME" value=""></td>
		<td class="td0">处理形式</td>
		<td align="left"><input type="hidden" name="CLXSID" value=""
			special="wordbook" wbtype="xf_cllx" wbname="CLXSNAME"> <input type="hidden" name="CLXSNAME" value="">
		</td>
	</tr>
	<tr>
		<td height="40" align="right" valign="middle" class="td0">来访性质</td>
		<td align="left" colspan="3"><input type="checkbox"
			name="LFXZID_0" value="1" />正常&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input
			type="checkbox" name="LFXZID_1" value="1" />围堵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_2" value="1" />滞留&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_3" value="1" />闹事&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_4" value="1" />静坐&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_5" value="1" />重要访&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
		<input type="checkbox" name="LFXZID_6" value="1" />强制&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_7" value="1" />越级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_8" value="1" />不稳定因素&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_9" value="1" />包案后上访&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_10" value="1" />未预报（20人以上）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
	</tr>
	<!-- 
	<tr align="right" valign="middle">
		<td class="td0">下访后上访</td>
		<td align="left"><input type="checkbox" name="XFHSSF" value="1" />
		</td>
		<td class="td0">包&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;案</td>
		<td align="left"><input type="checkbox" name="BA" value="1" /></td>
	</tr>
 	-->
	<tr align="right" valign="middle">
		<!-- <td class="td0">结果已回复</td>
		<td align="left"><input type="checkbox" name="JGYHF" value="1" />
		</td> -->
		<td class="td0">身&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;份</td>
		<td align="left"  colspan="3"><input type="hidden" name="SFID" value=""
			special="wordbook" wbtype="xf_sf" wbname="SFNAME"> <input
			type="hidden" name="SFNAME" value=""></td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数 <FONT
			COLOR="#FF3366">*</FONT></td>
		<td align="left"><input type="text" name="RS" maxlength="5"
			size="4" value="" onkeyup="value=value.replace(/[^\d]/g,'');setJFT(this.value)"
			colneed="1" label="人数" /> 人 <input type="hidden" name="JTF" id="JTF"/></td>
		<td class="td0">所 属 地 <FONT COLOR="#FF3366">*</FONT></td>
		<td align="left"  colspan="3">
		    <!--  
			<input type="text" name="SSDNAME" value="">
			-->
			<textarea name="SSDNAME" id="SSDNAME" cols="40" rows="2" colneed="1"  readonly="true"></textarea>
			<input type="hidden" name="SSD" value="" special="multidataindex"
			wbtype="SSD" wbname="SSDNAME"  ssdcode="<%=user.igroup().iarea() %>" colneed="1" label="所属地">
			&nbsp;<input type="text" name="QT_SDNAME" id="QT_SDNAME" value="">
		</td>
	</tr>
	<tr align="right" valign="middle">
		<!--  <td class="td0">是否重复反映</td>
		<td align="left"><input type="radio" name="SFCF" value="0"
			checked="checked" /> 首次反映 <input type="radio" name="SFCF" value="1" />
		重复反映</td> -->
		<td class="td0">被反映单位</td>
		<td align="left" colspan="3"><input type="text" name="BFYDW" maxlength="50"
			value="" /></td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">信访日期 <FONT COLOR="#FF3366">*</FONT></td>
		<td align="left"><input name="XFTIME" size="15"
			value="<%=DateTrimmer.getYMD() %>" type="hidden" special="date"
			colneed="1" label="信访日期" /></td>
		<td class="td0">信息重要程度<FONT
			COLOR="#FF3366">*</FONT></td>
		<td align="left"><input type="hidden" name="ZYCDID" value=""
			special="wordbook" wbtype="xf_zycd" wbname="ZYCDNAME"> <input
			type="hidden" name="ZYCDNAME" value=""></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">登记人<FONT COLOR="#FF3366">*</FONT></td>
		<td align="left"colspan="3"><%=user.iname()%> <input type="hidden"
			name="DJRID" value="<%=user.id() %>"> <input type="hidden"
			name="DJRNAME" value="<%=user.iname() %>"> <input name="XJTIME" value="" type="hidden"/>
		</td>
	</tr>
	<!--  <tr align="right" valign="middle">
		<td class="td0">经办部门<FONT COLOR="#FF3366">*</FONT></td>
		<td align="left" colspan="3" >
		<input type="hidden" name="H_GROUPID" value="" special="gu" select="multiGroup" root="<%=root %>" guname="H_GROUPNAME">
    	<input type="hidden" name="H_GROUPNAME" id="H_GROUPNAME" value=""/></td>
	</tr>-->
	<tr align="right" valign="middle">
		<td class="td0">经办部门 <FONT COLOR="#FF3366">*</FONT></td>
		<td colspan="3" align="left">
		<textarea name="H_GROUPNAME"  id="H_GROUPNAME"  cols="80"
			rows="2" colneed="1" label="协调部门" readonly="true"></textarea>
		<input type="hidden" name="H_GROUPID" id="H_GROUPID" value="" special="multidataindex" wbtype="JX" wbname="H_GROUPNAME">
		</td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">内&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;容 <FONT
			COLOR="#FF3366">*</FONT></td>
		<td colspan="3" align="left"><textarea name="NR" cols="80"
			rows="5" colneed="1" label="内容"></textarea></td>
	</tr>
	<!-- 
	<tr align="right" valign="middle">
		<td class="td0">关 键 字</td>
		<td colspan="3" align="left"><input type="text" name="GJZ"
			maxlength="50" size="80" value="" /></td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">处理方式</td>
		<td colspan="3" align="left"><textarea name="CLFS" cols="80"
			rows="3" ></textarea> </td>
	</tr>
	 -->
	<tr align="right" valign="middle" id="lingdao1">
		<td align="right" valign="middle" class="td0">接待领导</td>
		<td align="left"><input type="text" name="JDLDNAME" id="JDLDNAME" value=""  label="选择领导接待时接待领导">
		<input type="hidden" name="JDLDID" value="" special="dataindex"
			wbtype="JDLD" wbname="JDLDNAME"></td>
		<td class="td0">领导职务</td>
		<td align="left"><input type="hidden" name="LDZWID" value=""
			special="wordbook" wbtype="job" wbname="LDZWNAME"> <input
			type="hidden" name="LDZWNAME" value=""></td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">领导批示</td>
		<td colspan="3" align="left"><textarea name="LDPS" cols="80"
			rows="3"></textarea></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">领导批示件</td>
		<td colspan="3" align="left"><input type="file" name="LDPSJ"
			id="LDPSJ" />&nbsp;&nbsp;(文件大小不能超过10M,文件类型为“.doc,.xls,.txt,.jpg,.gif,.bmp,.pdf”)<BR>
		</td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">交 办 单</td>
		<td colspan="3" align="left"><input type="file" name="JBD"
			id="JBD" />&nbsp;&nbsp;(文件大小不能超过10M,文件类型为“.doc,.xls,.txt,.jpg,.gif,.bmp,.pdf”)<BR>
		</td>
	</tr>
	<tr>
		<td colspan="4" class="tdtlt">
		<div align="center">来访人登记</div>
		</td>
	</tr>
	
	<tr>
		<td colspan="4" class="nopadding">
		<table border="1" id="lxr" class="tab-noborder" width="100%" cellspacing="0"
			cellpadding="0">
			<tr>
			    <td class="td0" style="width:10px;border:0px;">&nbsp;</td>
				<td class="td0" style="border:0px;">信访人姓名</td>
				<td class="td0" style="border:0px;">性别</td>
				<td class="td0" style="border:0px;">年龄</td>
				<td class="td0" style="border:0px;">身份证号</td>
				<td class="td0" style="border:0px;">联系电话</td>
				<td class="td0" style="border:0px;">邮政编码</td>
				<td class="td0" style="border:0px;">单位或地址</td>
			</tr>
			<%
					if (list != null && !list.isEmpty()) {
					for (int i = 0; i < list.size(); i++) {
						
			%>
			<tr>
				<td style="border:0px;"><input type="checkbox" name="lxdtchk"
					value="lxdt_<%=i%>" idx="<%=i%>"/></td>
				<td style="border:0px;"><input type="hidden"
					name="lxdtid_<%=i %>" id="lxdtid_<%=i %>" special="none"/> <input
					type="hidden" name="lxid_<%=i %>" id="lxid_<%=i %>" special="none" /><input
					type="text" name="XF_USERNAME_<%=i %>" id="XF_USERNAME_<%=i %>" /></td>
				<td style="border:0px;"><select name="XF_USERSEX_<%=i %>"
					id="XF_USERSEX_<%=i %>">
					<option value="1">男</option>
					<option value="0">女</option>
				</select></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERAGE_<%=i %>" id="XF_USERAGE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERLICENSE_<%=i %>" id="XF_USERLICENSE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERTEL_<%=i %>" id="XF_USERTEL_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERCODE_<%=i %>" id="XF_USERCODE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERADDRESS_<%=i %>" id="XF_USERADDRESS_<%=i %>" /></td>
			</tr>
			<%
				}
				}
			%>
		</table>
		</td>
	</tr>
</table>

<table width="100%">
	<tr>
		<td align="center"><input type="button" name="btn0" class="button0" value=" 提交办理 "
			onclick="javascript:handleSave();">
		<input type="button" name="btn1" class="button0" value=" 返 回 " onclick="javascript:window.history.back(-1);">
	   </td>
	</tr>
</table>
</form>
<script>
	<%
         if(type.equals("0")){
     %>
     var district1 = document.getElementById('district1');
     district1.style.display="none";
     var BHLXID = document.getElementById('BHLXID');
		BHLXID.setAttribute("colneed", "0");
     <%
         }
     %>
	var lianxinxi = document.getElementById('lianxinxi');
	lianxinxi.style.display="none";
	
	var lingdao1 = document.getElementById('lingdao1');
	lingdao1.style.display="none";
     
     Date.prototype.Format = function(fmt){
    //author: meizz
    var o =
     {
        "M+" : this.getMonth() + 1, //月份
        "d+" : this.getDate(), //日
        "h+" : this.getHours(), //小时
        "m+" : this.getMinutes(), //分
        "s+" : this.getSeconds(), //秒
        "q+" : Math.floor((this.getMonth() + 3) / 3), //季度
        "S" : this.getMilliseconds() //毫秒
     };
    if (/(y+)/.test(fmt))
         fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
        if (new RegExp("(" + k + ")").test(fmt))
             fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}
     
	var NRID = document.getElementById("NRID");
	
	
	function sendRequestPost(){
	
		var url = context + '/app/xtbm.do?method=getXtbm';
	
		Ext.Ajax.request({
					url : url,
					params : {
						id : NRID.value
					},
					method : 'POST',
					success : function(rs, request) {
					var respText = Ext.util.JSON.decode(rs.responseText);
					
						if(respText.data!=null){
						   levelTwoNames =respText.data.JX_LEVEL2_TX_NAME;
						   var xjtime = respText.data.JSWCSX;
						   var now = new Date() ; 
						   now.setDate(now.getDate() + parseInt(xjtime));				
						   document.getElementById("XJTIME").value =now.Format("yyyy-MM-dd");
						   document.getElementById("H_GROUPNAME").value = levelTwoNames;
						   
						}
					},
					failure : function(rs, request) {
						Ext.Msg.alert('提示', '出现异常');
					}
				});
	
	
	}
	
	
	// 如果是FF
	if (NRID.addEventListener) {
		NRID.addEventListener('onpropertychange', sendRequestPost, false);
	}
	// 如果是IE
	else if (NRID.attachEvent) {
		NRID.attachEvent('onpropertychange', sendRequestPost);
	} else {
		NRID['onpropertychange'] = sendRequestPost;
	}
	
	
	if(document.getElementById("QT_SDNAME")!=null){
	
		(document.getElementById("QT_SDNAME")).style.display="none";
		
	}
	
    var total_kcz_name = ",JDR,QT_SDNAME,BFYDW,NR,LDPS,";
    
    var objForm = document.forms[0];
	var objLen = objForm.length;
	for ( var iCount = 0; iCount < objLen; iCount++) {
	   if(objForm.elements[iCount].type == 'textarea' || 
	   objForm.elements[iCount].type == 'text' || objForm.elements[iCount].type == 'hidden'){
	   		objForm.elements[iCount].readOnly = true;
	   		if(total_kcz_name.indexOf(','+objForm.elements[iCount].name+',')>-1){
	   			objForm.elements[iCount].readOnly = false;
	   		}
	   }else if(objForm.elements[iCount].type == 'button' || objForm.elements[iCount].type == 'file'){}
	     else{
			objForm.elements[iCount].disabled = true;
		 }
	   
	   
		
	}
	
</script>
</BODY>
</HTML>
